knowledge: 9 insights — migration verification, tmux pane delivery, harness interception, destructive-sweep fakes, rate-limit pacing - #30
Open
choiyounggi wants to merge 1 commit into
Conversation
5 new pages, 2 existing pages extended. New: - databases/schema-design/verifying-additive-migrations - platforms/processes/driving-a-tui-in-a-tmux-pane - platforms/processes/harness-tool-result-interception - testing/mocking/destructive-operations-on-shared-daemons - backend/common/reliability/client-side-rate-limit-pacing Extended: - platforms/shells/portable-shell-scripts (POSIX set -- scope, payload quoting) - platforms/shells/command-text-inspected-before-execution (blocked vs silent success) Five claims reproduced locally (tmux 3.7b, /bin/sh, dash, zsh); the rest sourced to SQLAlchemy, PostgreSQL, POSIX, tmux.1, Claude Code hooks, and Okta/Auth0/GitHub rate-limit docs. One page kept at field-tested because its provider quota could not be sourced.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Knowledge flush — 9 insight(s)
Drained 9 pending candidates from 7 session files in
~/.dev-loop/queue. Result:5 new pages, 2 existing pages extended, 0 dropped. No candidate was accepted on
assertion alone — each was re-derived from primary docs, reproduced locally, or
demoted to
field-testedwith the reason stated.Verified best-practice
1.
create_all()+ hand-written ALTER — testing additive migrationsClaim: a test that calls
init_db()twice does not test the migration; only arun that starts from the previous schema does.
Checked: SQLAlchemy metadata
—
create_all()"will issue queries that first check for the existence of eachindividual table, and if not found will issue the CREATE statements", and altering
constructs "via the ALTER statement … is outside of the scope of SQLAlchemy itself".
SQLAlchemy defaults —
server_default"gets placed in the CREATE TABLE statement", and neither defaultbackfills existing rows. PostgreSQL ddl-alter
— "the default value will be returned the next time the row is accessed".
Correction applied: the candidate credited the surviving-row values to the model's
server_default. The docs place the backfill on theDEFAULTclause of theALTERinstead; the page now says so, and adds
ADD COLUMNwithout aDEFAULTas the defectthe assertion catches. → verified
2. tmux pane-diff is not delivery evidence
Claim: a busy pane echoes typed characters, so a
capture-panediff reports"delivered" for input that was never consumed.
Reproduced (tmux 3.7b, macOS): sent
echo SECOND_PROMPTto a pane runningsleep 6— pane content changed (naive diff → delivered) while the command's ownoutput count stayed 0, becoming 1 only after the sleep drained. Mechanism is
terminal
ECHOin canonical mode(POSIX chap11).
→ verified
3.
tmux send-keyspayloads need a--separatorReproduced:
tmux send-keys -t S -l "-n hello"→command send-keys: unknown flag -n,exit 1; the identical call with
-- "-n hello"→ exit 0.POSIX Guideline 10
gives the mechanism. Noted honestly in the page: tmux.1
documents
-lbut does not document--; the behaviour follows getopt convention.→ verified
4. Backticks survive double quotes and gut a CLI text payload
Reproduced — in zsh, with the command example backquoted inside double quotes:
bash substituted the command's output instead; the single-quoted form printed the
text verbatim.
POSIX 2.2.3:
the backquote "shall retain its special meaning introducing the other form of command
substitution" inside double quotes. → verified
5. POSIX
set --inside a helper function is discardedReproduced under
/bin/shanddash:parse_flags "$@"left the caller withargc=4still containing--dry-run; the identical loop inline gaveargc=3with thespace-bearing operand intact.
DRY=1in both — the flag is detected either way, soonly the operand list is wrong and nothing errors. POSIX 2.9.5: on return "the value of
the special parameter
#and the positional parameters shall be restored to the valuesthey had before the function was executed". → verified
6. A gate-blocked command is indistinguishable from a silent success
Claim: a
worktree_escapeguardrail blocked the orchestrator's ownstatus-update.sh; empty stdout read as success while no status file was written.Verified in-session: the status directory was empty afterwards, and a Write-tool
call to the same tree succeeded — proving the block is command-text-scoped, not a
filesystem permission. Consistent with the page's already-cited
hooks doc (exit 2 blocks; the reason goes to
stderr, not stdout). → verified
7. A harness hook can replace a tool's result
Claim: a session-memory plugin returned only line 1 of a file plus a remediation
note that did not work.
Checked: the hooks doc documents
PostToolUseupdatedToolOutput— it "replaces the tool's result" — and namestransformation of "inbound tool results" as an intended use. The mechanism is
therefore verified; the specific plugin's behaviour is dated field context in the page,
and the page's rule is "size-check with
wcfirst, because interception and agenuinely small file look identical". → verified (mechanism) with dated field context
8. PATH-injected recording fake for destructive daemon sweeps
Reproduced: with a fake
tmuxprepended toPATH, a prefix sweep over fixturesrun-1, run-2, mydevlogged exactlyKILL run-1/KILL run-2, zero bystanderlines, and an empty log for a non-matching prefix — while the machine's 8 real tmux
sessions, 3 of which matched the pattern under test, were untouched. The seam is
POSIX chap08
PATHsearch order; fake-vs-mock framing fromFowler. → verified
9. Auth/token requests bypass a method-level rate-limit throttle
Claim: a throttle on the client's public methods misses the token POST issued
inside
_headers(), so two requests leave in the same second.Checked: Okta documents
per-endpoint rate-limit buckets covering OAuth token endpoints;
Auth0
publishes an
/oauth/tokenlimit; GitHubstates OAuth-app requests "count towards" the user's limit. Together these source the
general rule (token issuance is metered) and the remedy (throttle at the lowest
HTTP-issuing layer).
Honest limit: the specific 2-requests/second quota and the timestamped log evidence
come from one provider's mock environment and were not confirmed against that
provider's published spec — no primary doc stating the number was found, and no URL was
invented for it. The page is therefore field-tested, not verified, with the
provider-specific numbers confined to a "Field context" note.
Existing-layer check
Routed via
INDEX.md, then read every domain index whose route line overlapped, thenevery page whose "load when" line could collide.
Pages read in full:
platforms/shells/portable-shell-scripts,platforms/shells/command-text-inspected-before-execution,platforms/processes/non-interactive-cli-invocation,platforms/processes/background-services(its tmux mention),databases/schema-design/online-schema-changes,testing/mocking/what-to-mock,backend/common/reliability/timeouts-and-retries. Plus a repo-wide grep fortmux|orchestrat|rate limit|throttl|quotato catch coverage the index lines hide.Merged rather than duplicated (2):
set --in a function; backticks in a double-quoted payloadplatforms/shells/portable-shell-scripts"$@"reordering idiom + the inline-only rule; new step 6 on single- vs double-quoting a text payload; 3 edge cases, 3 Instead-of rows, 3 sourcesplatforms/shells/command-text-inspected-before-executionBoth pages'
last_verifiedbumped to 2026-08-05; both stay under the 120-line cap(92 and 107 body lines).
Overlap examined and rejected as a merge (4):
timeouts-and-retriescovers outbound-call reliability (timeouts, retry-by-failure-type,backoff, concurrency caps) but never client-side pacing to a provider quota — a
repo-wide grep found no
throttl|rate limitpage outside edge/WAF contexts insecurity/. New page; cross-linked for the 429/Retry-Afterpath.what-to-mockdecides whether to substitute an in-process dependency at aninterface. The daemon case has a different seam (
PATH, not an interface) and adifferent stake (the test can destroy the developer's environment). New page,
related-linked.online-schema-changesowns ALTER lock behaviour, not proving that a hand-rolledmigration ran. New sibling page in the same category, cross-linked for the
volatile-default rewrite case.
non-interactive-cli-invocationowns starting a prompt-capable CLI; driving analready-running TUI through a pty is a distinct case. New page,
related-linked.Conflicts flagged: none. No new directive contradicts an existing one.
Related-links added: every new page links back into the existing graph
(
online-schema-changes,nullability-and-defaults,test-data-and-isolation,tests-that-cannot-fail,what-to-mock,path-resolution,command-text-inspected-before-execution,non-interactive-cli-invocation,background-services,timeouts-and-retries,jwt-server-side,hypothesis-testing).An invariant pass confirms every
related:id and inline[page-id]referenceresolves, all 7 touched pages appear in their domain index, and no page exceeds 120
body lines.
Routing decision
create_all()+ hand-written ALTERdatabases/schema-design/verifying-additive-migrations--forsend-keyspayloadsplatforms/processes/driving-a-tui-in-a-tmux-paneplatforms/processes/harness-tool-result-interceptiontesting/mocking/destructive-operations-on-shared-daemonsbackend/common/reliability/client-side-rate-limit-pacingset --scope; backticks in a double-quoted payloadplatforms/shells/portable-shell-scriptsplatforms/shells/command-text-inspected-before-executionNo new categories were created. Each new page landed in an existing category, and
in the two places a new category was tempting the closest fit was taken instead:
databases/migrations/, butschema-design/alreadyholds
online-schema-changes, which is migration machinery. A category holding onepage next to its sibling adds a routing hop for no discrimination.
platforms/orchestration/.platforms/processes/already covers "keeping processesalive as services" and "invoking prompt-capable CLIs non-interactively"; driving and
observing another process is the same concern, so all three went there.
Root
INDEX.mdroute lines were extended for all four touched domains (databases,backend, testing, platforms);
log.mdgained oneingestand onereviseentry.Reviewer's attention is best spent on: the
field-testedrating onclient-side-rate-limit-pacing(§9 — the provider-specific quota is unsourced bydesign), and on whether insights 2, 3 and 7 belong under
platforms/processes/orjustify an
orchestrationcategory once more agent-harness pages accumulate.